package com.yifa.health_manage.model;

import java.util.Comparator;

public class BloodValuesInfo {
	// high_value:123,low_value:76

	private String datetime;

	public String getDatetime() {
		return datetime;
	}

	public void setDatetime(String datetime) {
		this.datetime = datetime;
	}

	private String high_value;
	private String low_value;
	private String value = "";

	private String period = "0";

	private String id;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPeriod() {
		return period;
	}

	public void setPeriod(String period) {
		this.period = period;
	}

	public String getHigh_value() {
		return high_value;
	}

	public void setHigh_value(String high_value) {
		this.high_value = high_value;
	}

	public String getLow_value() {
		return low_value;
	}

	public void setLow_value(String low_value) {
		this.low_value = low_value;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static class PeriodType implements Comparator<BloodValuesInfo> {

		@Override
		public int compare(BloodValuesInfo lhs, BloodValuesInfo rhs) {
			Integer integerLhs = Integer.valueOf(lhs.getPeriod());
			Integer integerRhs = Integer.valueOf(rhs.getPeriod());
			if (integerLhs < integerRhs) {
				return -1;
			} else if (integerLhs == integerRhs) {
				return 0;
			} else
				return 1;
		}

	}
}
